home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17252 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news text default
99% file C++ source text default
98% file C source text default
97% file C source, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 65 | 77 73 2e 63 61 69 73 2e |Path: ne|ws.cais.|
|00000010| 63 6f 6d 21 6e 65 77 73 | 0a 46 72 6f 6d 3a 20 43 |com!news|.From: C|
|00000020| 68 72 69 73 20 52 65 69 | 73 65 72 20 3c 63 72 65 |hris Rei|ser <cre|
|00000030| 69 73 65 72 40 69 64 73 | 32 2e 69 64 73 6f 6e 6c |iser@ids|2.idsonl|
|00000040| 69 6e 65 2e 63 6f 6d 3e | 0a 4e 65 77 73 67 72 6f |ine.com>|.Newsgro|
|00000050| 75 70 73 3a 20 63 6f 6d | 70 2e 6c 61 6e 67 2e 63 |ups: com|p.lang.c|
|00000060| 2b 2b 0a 53 75 62 6a 65 | 63 74 3a 20 52 65 3a 20 |++.Subje|ct: Re: |
|00000070| 55 53 2d 4d 41 2d 42 6f | 73 74 6f 6e 3a 20 20 43 |US-MA-Bo|ston: C|
|00000080| 2b 2b 20 28 32 20 79 65 | 61 72 73 29 0a 44 61 74 |++ (2 ye|ars).Dat|
|00000090| 65 3a 20 53 75 6e 2c 20 | 31 34 20 41 70 72 20 31 |e: Sun, |14 Apr 1|
|000000a0| 39 39 36 20 31 36 3a 33 | 39 3a 32 32 20 2d 30 34 |996 16:3|9:22 -04|
|000000b0| 30 30 0a 4f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |00.Organ|ization:|
|000000c0| 20 43 61 70 69 74 61 6c | 20 41 72 65 61 20 49 6e | Capital| Area In|
|000000d0| 74 65 72 6e 65 74 20 53 | 65 72 76 69 63 65 20 69 |ternet S|ervice i|
|000000e0| 6e 66 6f 40 63 61 69 73 | 2e 63 6f 6d 20 37 30 33 |nfo@cais|.com 703|
|000000f0| 2d 34 34 38 2d 34 34 37 | 30 0a 4d 65 73 73 61 67 |-448-447|0.Messag|
|00000100| 65 2d 49 44 3a 20 3c 33 | 31 37 31 36 32 37 41 2e |e-ID: <3|171627A.|
|00000110| 32 46 38 39 40 69 64 73 | 32 2e 69 64 73 6f 6e 6c |2F89@ids|2.idsonl|
|00000120| 69 6e 65 2e 63 6f 6d 3e | 0a 52 65 66 65 72 65 6e |ine.com>|.Referen|
|00000130| 63 65 73 3a 20 3c 33 31 | 36 44 42 34 42 44 2e 37 |ces: <31|6DB4BD.7|
|00000140| 35 33 33 40 70 72 65 63 | 69 73 69 6f 6e 53 79 73 |533@prec|isionSys|
|00000150| 74 65 6d 73 2e 63 6f 6d | 3e 20 3c 34 6b 70 62 62 |tems.com|> <4kpbb|
|00000160| 6b 24 6a 74 40 74 72 69 | 62 75 6e 65 2e 75 73 61 |k$jt@tri|bune.usa|
|00000170| 73 6b 2e 63 61 3e 0a 4e | 4e 54 50 2d 50 6f 73 74 |sk.ca>.N|NTP-Post|
|00000180| 69 6e 67 2d 48 6f 73 74 | 3a 20 69 70 32 33 34 2e |ing-Host|: ip234.|
|00000190| 69 64 73 6f 6e 6c 69 6e | 65 2e 63 6f 6d 0a 4d 69 |idsonlin|e.com.Mi|
|000001a0| 6d 65 2d 56 65 72 73 69 | 6f 6e 3a 20 31 2e 30 0a |me-Versi|on: 1.0.|
|000001b0| 43 6f 6e 74 65 6e 74 2d | 54 79 70 65 3a 20 74 65 |Content-|Type: te|
|000001c0| 78 74 2f 70 6c 61 69 6e | 3b 20 63 68 61 72 73 65 |xt/plain|; charse|
|000001d0| 74 3d 75 73 2d 61 73 63 | 69 69 0a 43 6f 6e 74 65 |t=us-asc|ii.Conte|
|000001e0| 6e 74 2d 54 72 61 6e 73 | 66 65 72 2d 45 6e 63 6f |nt-Trans|fer-Enco|
|000001f0| 64 69 6e 67 3a 20 37 62 | 69 74 0a 58 2d 4d 61 69 |ding: 7b|it.X-Mai|
|00000200| 6c 65 72 3a 20 4d 6f 7a | 69 6c 6c 61 20 32 2e 30 |ler: Moz|illa 2.0|
|00000210| 31 47 6f 6c 64 20 28 57 | 69 6e 39 35 3b 20 49 29 |1Gold (W|in95; I)|
|00000220| 0a 54 6f 3a 20 45 72 69 | 63 20 4e 65 75 66 65 6c |.To: Eri|c Neufel|
|00000230| 64 20 3c 65 72 69 63 40 | 63 73 2e 75 73 61 73 6b |d <eric@|cs.usask|
|00000240| 2e 63 61 3e 0a 0a 45 72 | 69 63 20 4e 65 75 66 65 |.ca>..Er|ic Neufe|
|00000250| 6c 64 20 77 72 6f 74 65 | 3a 0a 3e 20 0a 3e 20 54 |ld wrote|:.> .> T|
|00000260| 72 79 69 6e 67 20 74 6f | 20 75 73 65 20 74 65 6d |rying to| use tem|
|00000270| 70 6c 61 74 65 73 20 74 | 68 61 74 20 70 61 73 73 |plates t|hat pass|
|00000280| 20 63 68 61 72 20 73 74 | 72 69 6e 67 20 61 72 67 | char st|ring arg|
|00000290| 75 6d 65 6e 74 73 20 69 | 6e 20 42 43 2b 2b 34 2e |uments i|n BC++4.|
|000002a0| 30 0a 3e 20 0a 3e 20 65 | 67 2e 0a 3e 20 0a 3e 20 |0.> .> e|g..> .> |
|000002b0| 74 65 6d 70 6c 61 74 65 | 3c 63 6c 61 73 73 20 54 |template|<class T|
|000002c0| 2c 20 63 68 61 72 20 2a | 53 3e 0a 3e 20 63 6c 61 |, char *|S>.> cla|
|000002d0| 73 73 20 6c 69 6e 6b 6c | 69 73 74 20 7b 0a 3e 20 |ss linkl|ist {.> |
|000002e0| 20 20 20 20 20 20 20 20 | 2e 2e 2e 0a 3e 20 20 20 | |....> |
|000002f0| 20 20 20 20 20 20 76 6f | 69 64 20 6d 73 67 28 29 | vo|id msg()|
|00000300| 20 7b 20 63 6f 75 74 20 | 3c 3c 20 53 20 3c 3c 20 | { cout |<< S << |
|00000310| 65 6e 64 6c 3b 20 7d 0a | 3e 20 7d 3b 0a 3e 20 0a |endl; }.|> };.> .|
|00000320| 3e 20 76 6f 69 64 20 6d | 61 69 6e 7b 7d 0a 3e 20 |> void m|ain{}.> |
|00000330| 7b 0a 3e 20 20 20 20 20 | 20 20 20 20 6c 69 6e 6b |{.> | link|
|00000340| 6c 69 73 74 3c 69 6e 74 | 2c 22 54 45 53 54 22 3e |list<int|,"TEST">|
|00000350| 20 4c 4c 3b 0a 3e 20 20 | 20 20 20 20 20 20 20 4c | LL;.> | L|
|00000360| 4c 2e 6d 73 67 28 29 3b | 0a 3e 20 7d 0a 3e 20 0a |L.msg();|.> }.> .|
|00000370| 3e 20 49 20 66 6f 75 6e | 64 20 61 20 76 61 72 69 |> I foun|d a vari|
|00000380| 65 74 79 20 6f 66 20 74 | 68 69 6e 67 73 20 74 68 |ety of t|hings th|
|00000390| 61 74 20 77 6f 72 6b 65 | 64 20 75 6e 64 65 72 20 |at worke|d under |
|000003a0| 67 2b 2b 32 2e 37 2e 32 | 20 61 6e 64 20 53 47 49 |g++2.7.2| and SGI|
|000003b0| 20 43 43 2c 20 6e 6f 74 | 68 69 6e 67 0a 3e 20 66 | CC, not|hing.> f|
|000003c0| 6f 72 20 42 43 2b 2b 34 | 2e 30 2e 20 20 41 6e 79 |or BC++4|.0. Any|
|000003d0| 20 69 64 65 61 73 2e 0a | 3e 20 0a 3e 20 45 52 69 | ideas..|> .> ERi|
|000003e0| 63 0a 0a 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |c..The f|ollowing|
|000003f0| 20 77 6f 72 6b 73 2e 20 | 20 59 6f 75 20 63 61 6e | works. | You can|
|00000400| 6e 6f 74 20 75 73 65 20 | 61 20 6c 6f 63 61 6c 20 |not use |a local |
|00000410| 76 61 72 69 61 62 6c 65 | 20 74 6f 20 69 6e 73 74 |variable| to inst|
|00000420| 61 6e 74 69 61 74 65 20 | 61 20 0a 74 65 6d 70 6c |antiate |a .templ|
|00000430| 61 74 65 2e 20 20 54 68 | 65 72 65 66 6f 72 65 20 |ate. Th|erefore |
|00000440| 79 6f 75 20 6e 65 65 64 | 20 61 20 67 6c 6f 62 61 |you need| a globa|
|00000450| 6c 20 76 61 72 69 61 62 | 6c 65 20 28 50 20 62 65 |l variab|le (P be|
|00000460| 6c 6f 77 29 20 74 6f 20 | 74 72 61 6e 73 66 65 72 |low) to |transfer|
|00000470| 0a 74 68 65 20 6c 6f 63 | 61 6c 20 76 61 72 69 61 |.the loc|al varia|
|00000480| 62 6c 65 20 74 6f 20 74 | 68 65 20 74 65 6d 70 6c |ble to t|he templ|
|00000490| 61 74 65 2e 20 20 41 6c | 73 6f 2c 20 79 6f 75 20 |ate. Al|so, you |
|000004a0| 6e 65 65 64 20 6d 73 67 | 28 29 20 74 6f 20 62 65 |need msg|() to be|
|000004b0| 20 70 75 62 6c 69 63 2e | 0a 0a 23 69 6e 63 6c 75 | public.|..#inclu|
|000004c0| 64 65 20 3c 69 6f 73 74 | 72 65 61 6d 2e 68 3e 0a |de <iost|ream.h>.|
|000004d0| 0a 63 68 61 72 20 2a 50 | 3b 0a 74 65 6d 70 6c 61 |.char *P|;.templa|
|000004e0| 74 65 3c 63 6c 61 73 73 | 20 54 2c 20 63 68 61 72 |te<class| T, char|
|000004f0| 20 2a 53 3e 0a 63 6c 61 | 73 73 20 6c 69 6e 6b 6c | *S>.cla|ss linkl|
|00000500| 69 73 74 20 0a 7b 0a 70 | 75 62 6c 69 63 3a 0a 20 |ist .{.p|ublic:. |
|00000510| 20 20 20 76 6f 69 64 20 | 6d 73 67 28 29 7b 20 63 | void |msg(){ c|
|00000520| 6f 75 74 20 3c 3c 20 53 | 20 3c 3c 20 65 6e 64 6c |out << S| << endl|
|00000530| 3b 20 7d 0a 7d 3b 0a 0a | 76 6f 69 64 20 6d 61 69 |; }.};..|void mai|
|00000540| 6e 28 29 0a 7b 0a 20 20 | 20 20 63 68 61 72 20 52 |n().{. | char R|
|00000550| 5b 5d 20 3d 20 22 54 45 | 53 54 22 3b 0a 20 20 20 |[] = "TE|ST";. |
|00000560| 20 50 20 3d 20 52 3b 0a | 20 20 20 20 6c 69 6e 6b | P = R;.| link|
|00000570| 6c 69 73 74 3c 69 6e 74 | 2c 20 50 3e 20 4c 4c 3b |list<int|, P> LL;|
|00000580| 0a 20 20 20 20 4c 4c 2e | 6d 73 67 28 29 3b 0a 7d |. LL.|msg();.}|
|00000590| 0a 0a 5f 5f 20 43 68 72 | 69 73 20 5f 5f 0a |..__ Chr|is __. |
+--------+-------------------------+-------------------------+--------+--------+